define([
    "UtilDir/util",
    "UtilDir/tool",
    "UtilDir/combotree",
    "UtilDir/org/selectOrg",
    "UtilDir/searchBlock",
    "UtilDir/loading",
    "UtilDir/dialog",
    "Date", "DateCN", "css!DateCss",
    "EasyUI", "EasyUI-lang",
], function (Util, Tool, Combotree, SelectOrg, SearchBlock, Loading,Dialog) {
    var getController = function () {
        return getServer() + "/pc/qhProbabilityEarthquakeDanger";
    };

    var loading = Loading({
        text: "正在导出"
    });
    // 初始化
    var init = function () {
        initSearchBlock();
        queryBtnBind();
        initcreateProvince();
        debugger
        var url = window.location.href;
        var pageType = url.split("=")[url.split("=").length - 1];
        switch (pageType) {
            case 'hddcPGA':
                //createAuditGrid1();
                break;
            case 'hddcLevelPoint':
                //createAuditGrid2();
                break;
            case 'hddcLevelArea':
                //createAuditGrid3();
                break;
            case 'hddcAreaMap':
                createAuditGrid4();
                break;
            case 'hddc100m':
                createAuditGrid5();
                break;
            case 'hddc200m':
                createAuditGrid6();
                break;
            case 'hddcquery':
                createAuditGrid7();
                break;
            case 'hddcPositionError':
                createAuditGrid8();
                break;
            case 'hddc50Year63':
                createAuditGrid9();
                break;
            case 'hddc50Year10':
                createAuditGrid10();
                break;
            case 'hddc50Year2':
                createAuditGrid11();
                break;
            case 'hddc50Year1':
                createAuditGrid12();
                break;
            case 'hddc50YearDie63':
                createAuditGrid13();
                break;
            case 'hddc50YearDie10':
                createAuditGrid14();
                break;
            case 'hddchddc50YearDie2':
                createAuditGrid15();
                break;
            case 'hddchddc50YearDie1':
                createAuditGrid16();
                break;

        }
    }

    var loading = Loading({
        text: "正在质检"
    });

    var initcreateProvince = function () {
        var html = "";
        $("#citySelect").append(html);
        $("#areaSelect").append(html);
        $.ajax({
            url: getServer() + "/divisions/root/subdivisions",
            contentType: "application/json",
            type: "get",
            success: function (data) {
                //console.log(data)
                $.each(data, function (idx, item) {
                    html += "<option value='" + item.divisionName + "' exid='" + item.divisionId + "'>" + item.divisionName + "</option>";
                });
                $("#provinceSelect").append(html);
            }
        });
        $("#provinceSelect").change(function () {
            var html = '<option value="" disabled selected style="display:none;">请选择</option>';
            $("#citySelect option").remove();
            $("#citySelect").append(html);
            $("#areaSelect option").remove();
            $("#areaSelect").append(html);
            var divisionId = $(this).find("option:selected").attr("exid");
            if ($(this).val() == "北京市" || $(this).val() == "天津市" || $(this).val() == "上海市" || $(this).val() == "重庆市") {
                $("#citySelect").append("<option value='" + $(this).val() + "' exid='" + divisionId + "'>" + $(this).val() + "</option>");
                return;
            }
            $.ajax({
                url: getServer() + "/divisions/" + divisionId + "/subdivisions",
                contentType: "application/json",
                type: "get",
                success: function (data) {
                    $.each(data, function (idx, item) {
                        html += "<option value='" + item.divisionName + "' exid='" + item.divisionId + "'>" + item.divisionName + "</option>";
                    });
                    $("#citySelect").append(html);
                }
            });
        });
        $("#citySelect").change(function () {
            if ($(this).val() == "") return;
            var html = '<option value="" disabled selected style="display:none;">请选择</option>';
            $("#areaSelect option").remove();
            $("#areaSelect").append(html);
            var divisionId = $(this).find("option:selected").attr("exid");
            $.ajax({
                url: getServer() + "/divisions/" + divisionId + "/subdivisions",
                contentType: "application/json",
                type: "get",
                success: function (data) {
                    $.each(data, function (idx, item) {
                        html += "<option value='" + item.divisionName + "' exid='" + item.divisionId + "'>" + item.divisionName + "</option>";
                    });
                    $("#areaSelect").append(html);
                }
            });
        });
    }
    var initSearchBlock = function () {
        SearchBlock.init("searchBlock");
        require(["jquery", "Date", "DateCN", "css!DateCss"], function ($) {
            $("#projectCompleteDateIndex").datetimepicker({
                //设置使用语言：cn是自定义的中文版本，还可以扩展其他语言版本
                language: "cn",
                //输出格式化
                format: 'yyyy-mm-dd',
                //直接选择‘今天’
                todayBtn: true,
                //设置最精确的时间选择视图
                minView: 'month',
                //高亮当天日期
                todayHighlight: true,
                //显示“上午”“下午”
                showMeridian: true,
                //选择完毕后自动关闭
                autoclose: true
            });
            /* 删除按钮 */
            $("#complex_show0").on("click", function () {
                $('#projectCompleteDateIndex').datetimepicker('show');
            });
            /* 显示按钮 */
            $("#complex_del0").on("click", function () {
                $("#projectCompleteDateIndex").val("");
            });

            $("#complex1").datetimepicker({
                //设置使用语言：cn是自定义的中文版本，还可以扩展其他语言版本
                language: "cn",
                //输出格式化
                format: 'yyyy-mm-dd',
                //直接选择‘今天’
                todayBtn: true,
                //设置最精确的时间选择视图
                minView: 'month',
                //高亮当天日期
                todayHighlight: true,
                //显示“上午”“下午”
                showMeridian: true,
                //选择完毕后自动关闭
                autoclose: true
            });
            /* 删除按钮 */
            $("#complex_show1").on("click", function () {
                $('#complex1').datetimepicker('show');
            });
            /* 显示按钮 */
            $("#complex_del1").on("click", function () {
                $("#complex1").val("");
            });

            $("#complex2").datetimepicker({
                //设置使用语言：cn是自定义的中文版本，还可以扩展其他语言版本
                language: "cn",
                //输出格式化
                format: 'yyyy-mm-dd',
                //直接选择‘今天’
                todayBtn: true,
                //设置最精确的时间选择视图
                minView: 'month',
                //高亮当天日期
                todayHighlight: true,
                //显示“上午”“下午”
                showMeridian: true,
                //选择完毕后自动关闭
                autoclose: true
            });
            /* 删除按钮 */
            $("#complex_show2").on("click", function () {
                $('#complex2').datetimepicker('show');
            });
            /* 显示按钮 */
            $("#complex_del2").on("click", function () {
                $("#complex2").val("");
            });
        })

    };
    var queryBtnBind = function () {
        $("#complex1").change(function () {
            if ($("#complex1").val() != "" && $("#complex2").val() != "") {
                if ($("#complex1").val() > $("#complex2").val()) {
                    Util.alert("开始时间必须小于等于结束时间", function () {
                        $("#complex1").val("");
                        $("#complex2").val("");
                    });
                    return;
                }
            }
        });
        $("#complex2").change(function () {
            if ($("#complex1").val() != "" && $("#complex2").val() != "") {
                if ($("#complex1").val() > $("#complex2").val()) {
                    Util.alert("开始时间必须小于等于结束时间", function () {
                        $("#complex1").val("");
                        $("#complex2").val("");
                    });
                    return;
                }
            }
        });

        $("#btnSearch").click(function () {
            var url = window.location.href;
            var pageType = url.split("=")[url.split("=").length - 1];
            switch (pageType) {
                case 'hddcPGA':
                    createAuditGrid1();
                    break;
                case 'hddcLevelPoint':
                    createAuditGrid2();
                    break;
                case 'hddcLevelArea':
                    createAuditGrid3();
                    break;
                case 'hddcAreaMap':
                    createAuditGrid4();
                    break;
                case 'hddc100m':
                    createAuditGrid5();
                    break;
                case 'hddc200m':
                    createAuditGrid6();
                    break;
                case 'hddcquery':
                    createAuditGrid7();
                    break;
                case 'hddcPositionError':
                    createAuditGrid8();
                    break;
                case 'hddc50Year63':
                    createAuditGrid9();
                    break;
                case 'hddc50Year10':
                    createAuditGrid10();
                    break;
                case 'hddc50Year2':
                    createAuditGrid11();
                    break;
                case 'hddc50Year1':
                    createAuditGrid12();
                    break;
                case 'hddc50YearDie63':
                    createAuditGrid13();
                    break;
                case 'hddc50YearDie10':
                    createAuditGrid14();
                    break;
                case 'hddchddc50YearDie2':
                    createAuditGrid15();
                    break;
                case 'hddchddc50YearDie1':
                    createAuditGrid16();
                    break;

            }
        });
        $("#btnReset").click(function () {
            $("#provinceSelect").val("");
            $("#citySelect").val("");
            $("#areaSelect").val("");
            $("#complex1").val("");
            $("#complex2").val("");
        });
        $("#btnQuality").click(function () {
            var url = window.location.href;
            var pageType = url.split("=")[url.split("=").length - 1];
            switch (pageType) {
                case 'hddcPGA':
                    submit1();
                    break;
                case 'hddcLevelPoint':
                    submit2();
                    break;
                case 'hddcLevelArea':
                    submit3();
                    break;
                case 'hddcAreaMap':
                    submit4();
                    break;
                case 'hddc100m':
                    submit5();
                    break;
                case 'hddc200m':
                    submit6();
                    break;
                case 'hddcquery':
                    submit7();
                    break;
                case 'hddcPositionError':
                    submit8();
                    break;
                case 'hddc50Year63':
                    submit9();
                    break;
                case 'hddc50Year10':
                    submit10();
                    break;
                case 'hddc50Year2':
                    submit11();
                    break;
                case 'hddc50Year1':
                    submit12();
                    break;
                case 'hddc50YearDie63':
                    submit13();
                    break;
                case 'hddc50YearDie10':
                    submit14();
                    break;
                case 'hddchddc50YearDie2':
                    submit15();
                    break;
                case 'hddchddc50YearDie1':
                    submit16();
                    break;
            }
        });
    };

    // hddcPGA 地震动PGA图查询
    var createAuditGrid1 = function () {
        $("#auditGrid").datagrid({
            url: getServer() + "/pc/qhProbabilityEarthquakeDanger/findData",
            method: "GET",
            fitColumns: true,
            autoRowHeight: false,
            columns: [
                [
                    {
                        field: 'province',
                        title: '省', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'city',
                        title: '市', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'area',
                        title: '区（县）', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'a',
                        title: '经度', sortable: true,
                        width: '10%',
                        align: 'center',
                    },
                    {
                        field: 'b',
                        title: '纬度', sortable: true,
                        width: '10%',
                        align: 'center',
                    },
                    {
                        field: 'c',
                        title: '50年超越概率63%场地PGA', sortable: true,
                        width: '10%',
                        align: 'center',
                    },
                    {
                        field: 'd',
                        title: '50年超越概率63%基岩PGA', sortable: true,
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'e',
                        title: '50年超越概率10%场地PGA', sortable: true,
                        width: '10%',
                        align: 'center',
                    },
                    {
                        field: 'f',
                        title: '50年超越概率10%基岩PGA', sortable: true,
                        width: '10%',
                        align: 'center',
                    },
                    {
                        field: 'g',
                        title: '50年超越概率2%场地PGA', sortable: true,
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'h',
                        title: '50年超越概率2%基岩PGA', sortable: true,
                        width: '10%',
                        align: 'center',
                    },
                    {
                        field: 'i',
                        title: '100年超越概率1%场地PGA', sortable: true,
                        width: '10%',
                        align: 'center',
                    },
                    {
                        field: 'j',
                        title: '100年超越概率1%基岩PGA', sortable: true,
                        width: '10%',
                        align: 'center',
                    },
                    {
                        field: 'isReportPg',
                        title: '是否上报pg库',
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 1) {
                                return '已上报';
                            } else {
                                return '未上报';
                            }
                        }
                    },
                    {
                        field: 'createUser',
                        title: '上传人',
                        width: '10%',
                        align: 'center',
                    },
                    {
                        field: 'createTime',
                        title: '上传日期', sortable: true,
                        width: '10%',
                        align: 'center',
                    },
                    {
                        field: 'qualityStatus',
                        title: '质检状态',sortable: true,
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 0 || value == null || value == 'null') {
                                return '未系统质检';
                            } else if (value == 1) {
                                return '系统质检通过';
                            } else if (value == 2) {
                                return '系统质检未通过';
                            }
                        }
                    },
                    {
                        field: 'qualityComment',
                        title: '质检意见',
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 'null') {
                                return null;
                            } else {
                                return value;
                            }
                        }
                    },
                ]
            ],
            toolbar: [{
                iconCls: 'fa fa-download',
                text: "导出",
                handler: function () {
                    loading.show();
                    window.location.href = getServer() + "/pc/qhProbabilityEarthquakeDanger/export";
                    loading.close();
                }
            }, {
                iconCls: 'fa fa-share-square-o',
                text: "系统自动质检",
                handler: function () {
                    submit1();
                }
            },{
                iconCls: 'fa fa-file-archive-o',
                text: "展示附件列表",
                handler: function () {
                    attachmentShow();
                }
            }],
            queryParams: {
                province: $("#provinceSelect").val(),
                city: $("#citySelect").val(),
                area: $("#areaSelect").val(),
                startTime: $("#complex1").val(),
                endTime: $("#complex2").val(),
            },
            pagination: true,
            pageSize: 10
        });
    };
    // 系统自动质检
    var submit1 = function () {
        var queryVo= {
                province: $("#provinceSelect").val(),
                city: $("#citySelect").val(),
                area: $("#areaSelect").val(),
                startTime: $("#complex1").val(),
                endTime: $("#complex2").val(),
            };
        loading.show();
        $.ajax({
            url: getServer() + "/pc/qhProbabilityEarthquakeDanger/dataQualityCheck",
            contentType: "application/json",
            data: JSON.stringify(queryVo),
            type: "post",
            success: function (data) {
                loading.close();
                Util.alert(data.message)
                createAuditGrid1();
            }
        });
    };
    //
    var attachmentShow = function () {
        var dialog = Dialog({
            id: "BaseDialog",
            title: "附件展示",
            width: "520px",
            height: "300px",
            dialogSize: "",               //modal-lg或modal-sm
            body: "<div id='fileGird'></div>",
        });

        $.ajax({
            url: getController() + "/attachment-show",
            contentType: "application/json",
            type: "get",
            success: function (data) {
                console.log(data)
                // alert(data.message)
                createFileGrid(data);
            }
        });
    };

    //创建附件表格只需定义一次
    var createFileGrid= function(data) {
        $("#fileGird").datagrid({
            fitColumns: true,
            autoRowHeight: false,
            rownumbers:true,
            data:data,
            columns:[[
                /*{field:"ck",checkbox:true},*/
                {
                    field: 'id',
                    title:'点击即可下载附件',
                    width:'100%',
                    align:'center',
                    formatter:function(value,rowData,rowIndex){
                        debugger
                        //return '<a href='+ getController()+'"/attachment-download?fileName="'+rowData+'>' +rowData+'</a>'
                        return '<a href="#" onclick="_downloadAttachmentDownload(\'' + rowData + '\');"> ' + rowData + ' </a> '
                    }
                },
            ]],
        });
    };

    window._downloadAttachmentDownload = function (fileName){
        window.location.href = getController() + "/attachment-download?fileName=" + encodeURIComponent(fileName);
    };


    var createtableGrid = function () {
        $("#hddcqueryForm").datagrid({
            url: getServer() + "/queryHddcA1Invrgnhasmaterialtables",
            method: "GET",
            fitColumns: true,
            autoRowHeight: false,
            columns: [[
                {field: "ck", checkbox: true},
                {
                    field: 'id',sortable:true,
                    title: '记录编号',
                    width: '20%',
                    align: 'center',
                    formatter: function (value, rowData, rowIndex) {
                        return '<a href="#" onclick="_editHddcA1Invrgnhasmaterialtable(\'' + rowData.uuid + '\');"> ' + rowData.id + ' </a> '
                    }
                },
            ]],
            queryParams: {},
            pagination: true,
            pageSize: 10
        });
    };
    // hddcLevelPoint 地震危险性等级图（矢量点）查询
    var createAuditGrid2 = function () {
        $("#auditGrid").datagrid({
            url: getServer() + "/pc/qhRiskLevelMapPoint/findData",
            method: "GET",
            fitColumns: true,
            autoRowHeight: false,
            columns: [
                [
                    {
                        field: 'province',
                        title: '省', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'city',
                        title: '市', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'area',
                        title: '区（县）', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'a',
                        title: '经度', sortable: true,
                        width: '10%',
                        align: 'center',
                    },
                    {
                        field: 'b',
                        title: '纬度', sortable: true,
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'c',
                        title: '危险性等级', sortable: true,
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'isReportPg',
                        title: '是否上报pg库',
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 1) {
                                return '已上报';
                            } else {
                                return '未上报';
                            }
                        }
                    },
                    {
                        field: 'createUser',
                        title: '上传人',
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'createTime',
                        title: '上传日期', sortable: true,
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'qualityStatus',
                        title: '质检状态',sortable: true,
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 0 || value == null || value == 'null') {
                                return '未系统质检';
                            } else if (value == 1) {
                                return '系统质检通过';
                            } else if (value == 2) {
                                return '系统质检未通过';
                            }
                        }
                    },
                    {
                        field: 'qualityComment',
                        title: '质检意见',
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 'null') {
                                return null;
                            } else {
                                return value;
                            }
                        }
                    },
                ]
            ],
            toolbar: [{
                iconCls: 'fa fa-download',
                text: "导出",
                handler: function () {
                    window.location.href = getServer() + "/pc/qhRiskLevelMapPoint/export";
                }
            }, {
                iconCls: 'fa fa-share-square-o',
                text: "系统自动质检",
                handler: function () {
                    submit2();
                }
            },{
                iconCls: 'fa fa-file-archive-o',
                text: "展示附件列表",
                handler: function () {
                    attachmentShow2();
                }
            }],
            queryParams: {
                province: $("#provinceSelect").val(),
                city: $("#citySelect").val(),
                area: $("#areaSelect").val(),
                startTime: $("#complex1").val(),
                endTime: $("#complex2").val(),
            },
            pagination: true,
            pageSize: 10
        });
    };
    var attachmentShow2 = function () {
        var dialog = Dialog({
            id: "BaseDialog",
            title: "附件展示",
            width: "520px",
            height: "300px",
            dialogSize: "",               //modal-lg或modal-sm
            body: "<div id='fileGird'></div>",
        });

        $.ajax({
            url: getServer() + "/pc/qhRiskLevelMapPoint/attachment-show",
            contentType: "application/json",
            type: "get",
            success: function (data) {
                console.log(data)
                // alert(data.message)
                createFileGrid(data);
            }
        });
    };
    // 系统自动质检
    var submit2 = function () {
        var queryVo= {
                province: $("#provinceSelect").val(),
                city: $("#citySelect").val(),
                area: $("#areaSelect").val(),
                startTime: $("#complex1").val(),
                endTime: $("#complex2").val(),
            };
        loading.show();
        $.ajax({
            url: getServer() + "/pc/qhRiskLevelMapPoint/dataQualityCheck",
            contentType: "application/json",
            data: JSON.stringify(queryVo),
            type: "post",
            success: function (data) {
                loading.close();
                Util.alert(data.message)
                createAuditGrid2();
            }
        });
    };
    // hddcLevelArea 地震危险性等级图（矢量面）查询
    var createAuditGrid3 = function () {
        $("#auditGrid").datagrid({
            url: getServer() + "/pc/qhRiskLevelMapPolygon/findData",
            method: "GET",
            fitColumns: true,
            autoRowHeight: false,
            columns: [
                [
                    {
                        field: 'province',
                        title: '省', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'city',
                        title: '市', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'area',
                        title: '区（县）', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'level',
                        title: '危险性等级', sortable: true,
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'isReportPg',
                        title: '是否上报pg库',
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 1) {
                                return '已上报';
                            } else {
                                return '未上报';
                            }
                        }
                    },
                    {
                        field: 'createUser',
                        title: '上传人',
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'createTime',
                        title: '上传日期', sortable: true,
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'qualityStatus',
                        title: '质检状态',sortable: true,
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 0 || value == null || value == 'null') {
                                return '未系统质检';
                            } else if (value == 1) {
                                return '系统质检通过';
                            } else if (value == 2) {
                                return '系统质检未通过';
                            }
                        }
                    },
                    {
                        field: 'qualityComment',
                        title: '质检意见',
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 'null') {
                                return null;
                            } else {
                                return value;
                            }
                        }
                    },
                ]
            ],
            toolbar: [{
                iconCls: 'fa fa-download',
                text: "导出",
                handler: function () {
                    window.location.href = getServer() + "/pc/qhRiskLevelMapPolygon/export";
                }
            }, {
                iconCls: 'fa fa-share-square-o',
                text: "系统自动质检",
                handler: function () {
                    submit3();
                }
            },{
                iconCls: 'fa fa-file-archive-o',
                text: "展示附件列表",
                handler: function () {
                    attachmentShow3();
                }
            }],
            queryParams: {
                province: $("#provinceSelect").val(),
                city: $("#citySelect").val(),
                area: $("#areaSelect").val(),
                startTime: $("#complex1").val(),
                endTime: $("#complex2").val(),
            },
            pagination: true,
            pageSize: 10
        });
    };
    var attachmentShow3 = function () {
        var dialog = Dialog({
            id: "BaseDialog",
            title: "附件展示",
            width: "520px",
            height: "300px",
            dialogSize: "",               //modal-lg或modal-sm
            body: "<div id='fileGird'></div>",
        });

        $.ajax({
            url: getServer() + "/pc/qhRiskLevelMapPolygon/attachment-show",
            contentType: "application/json",
            type: "get",
            success: function (data) {
                console.log(data)
                // alert(data.message)
                createFileGrid(data);
            }
        });
    };
    // 系统自动质检
    var submit3 = function () {
        var queryVo= {
                province: $("#provinceSelect").val(),
                city: $("#citySelect").val(),
                area: $("#areaSelect").val(),
                startTime: $("#complex1").val(),
                endTime: $("#complex2").val(),
            };
        loading.show();
        $.ajax({
            url: getServer() + "/pc/qhRiskLevelMapPolygon/dataQualityCheck",
            contentType: "application/json",
            data: JSON.stringify(queryVo),
            type: "post",
            success: function (data) {
                loading.close();
                Util.alert(data.message)
                createAuditGrid3();
            }
        });
    };
    // hddcAreaMap 房屋设施抗震加固区划图查询
    var createAuditGrid4 = function () {
        $("#auditGrid").datagrid({
            url: getServer() + "/pc/fxqhPriority/findData",
            method: "GET",
            fitColumns: true,
            autoRowHeight: false,
            columns: [
                [
                    {
                        field: 'province',
                        title: '省', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'city',
                        title: '市', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'area',
                        title: '区（县）', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'priority',
                        title: '抗震加固等级', sortable: true,
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'isReportPg',
                        title: '是否上报pg库',
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 1) {
                                return '已上报';
                            } else {
                                return '未上报';
                            }
                        }
                    },
                    {
                        field: 'createUser',
                        title: '上传人',
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'createTime',
                        title: '上传日期', sortable: true,
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'qualityStatus',
                        title: '质检状态',sortable: true,
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 0 || value == null || value == 'null') {
                                return '未系统质检';
                            } else if (value == 1) {
                                return '系统质检通过';
                            } else if (value == 2) {
                                return '系统质检未通过';
                            }
                        }
                    },
                    {
                        field: 'qualityComment',
                        title: '质检意见',
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 'null') {
                                return null;
                            } else {
                                return value;
                            }
                        }
                    },
                ]
            ],
            toolbar: [{
                iconCls: 'fa fa-download',
                text: "导出",
                handler: function () {
                    window.location.href = getServer() + "/pc/qhRiskLevelMapPolygon/export";
                }
            }, {
                iconCls: 'fa fa-share-square-o',
                text: "系统自动质检",
                handler: function () {
                    submit4();
                }
            },{
                iconCls: 'fa fa-file-archive-o',
                text: "展示附件列表",
                handler: function () {
                    attachmentShow4();
                }
            }],
            queryParams: {
                province: $("#provinceSelect").val(),
                city: $("#citySelect").val(),
                area: $("#areaSelect").val(),
                startTime: $("#complex1").val(),
                endTime: $("#complex2").val(),
            },
            pagination: true,
            pageSize: 10
        });
    };
    var attachmentShow4 = function () {
        var dialog = Dialog({
            id: "BaseDialog",
            title: "附件展示",
            width: "520px",
            height: "300px",
            dialogSize: "",               //modal-lg或modal-sm
            body: "<div id='fileGird'></div>",
        });

        $.ajax({
            url: getServer() + "/pc/qhRiskLevelMapPolygon/attachment-show",
            contentType: "application/json",
            type: "get",
            success: function (data) {
                console.log(data)
                // alert(data.message)
                createFileGrid(data);
            }
        });
    };
    // 系统自动质检
    var submit4 = function () {
        var queryVo= {
                province: $("#provinceSelect").val(),
                city: $("#citySelect").val(),
                area: $("#areaSelect").val(),
                startTime: $("#complex1").val(),
                endTime: $("#complex2").val(),
            };
        loading.show();
        $.ajax({
            url: getServer() + "/pc/fxqhPriority/dataQualityCheck",
            contentType: "application/json",
            data: JSON.stringify(queryVo),
            type: "post",
            success: function (data) {
                loading.close();
                Util.alert(data.message)
                createAuditGrid4();
            }
        });
    };
    // hddc100m 地震灾害防治区划图（活动断层100m避让缓冲区）查询
    var createAuditGrid5 = function () {
        $("#auditGrid").datagrid({
            url: getServer() + "/pc/fxqhHddc100/findData",
            method: "GET",
            fitColumns: true,
            autoRowHeight: false,
            columns: [
                [
                    {
                        field: 'province',
                        title: '省', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'city',
                        title: '市', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'area',
                        title: '区（县）', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'hdcCode',
                        title: '断层编号', sortable: true,
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'hdcName',
                        title: '断层名称',
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'isReportPg',
                        title: '是否上报pg库',
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 1) {
                                return '已上报';
                            } else {
                                return '未上报';
                            }
                        }
                    },
                    {
                        field: 'createUser',
                        title: '上传人',
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'createTime',
                        title: '上传日期', sortable: true,
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'qualityStatus',
                        title: '质检状态',sortable: true,
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 0 || value == null || value == 'null') {
                                return '未系统质检';
                            } else if (value == 1) {
                                return '系统质检通过';
                            } else if (value == 2) {
                                return '系统质检未通过';
                            }
                        }
                    },
                    {
                        field: 'qualityComment',
                        title: '质检意见',
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 'null') {
                                return null;
                            } else {
                                return value;
                            }
                        }
                    },
                ]
            ],
            toolbar: [{
                iconCls: 'fa fa-download',
                text: "导出",
                handler: function () {
                    window.location.href = getServer() + "/pc/fxqhHddc100/export";
                }
            }, {
                iconCls: 'fa fa-share-square-o',
                text: "系统自动质检",
                handler: function () {
                    submit5();
                }
            }],
            queryParams: {
                province: $("#provinceSelect").val(),
                city: $("#citySelect").val(),
                area: $("#areaSelect").val(),
                startTime: $("#complex1").val(),
                endTime: $("#complex2").val(),
            },
            pagination: true,
            pageSize: 10
        });
    };
    // 系统自动质检
    var submit5 = function () {
        var queryVo= {
                province: $("#provinceSelect").val(),
                city: $("#citySelect").val(),
                area: $("#areaSelect").val(),
                startTime: $("#complex1").val(),
                endTime: $("#complex2").val(),
            };
        loading.show();
        $.ajax({
            url: getServer() + "/pc/fxqhHddc100/dataQualityCheck",
            contentType: "application/json",
            data: JSON.stringify(queryVo),
            type: "post",
            success: function (data) {
                loading.close();
                Util.alert(data.message)
                createAuditGrid5();
            }
        });
    };
    // hddc200m 地震灾害防治区划图（活动断层200m避让缓冲区）查询
    var createAuditGrid6 = function () {
        $("#auditGrid").datagrid({
            url: getServer() + "/pc/fxqhHddc200/findData",
            method: "GET",
            fitColumns: true,
            autoRowHeight: false,
            columns: [
                [
                    {
                        field: 'province',
                        title: '省', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'city',
                        title: '市', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'area',
                        title: '区（县）', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'hdcCode',
                        title: '断层编号', sortable: true,
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'hdcName',
                        title: '断层名称',
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'isReportPg',
                        title: '是否上报pg库',
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 1) {
                                return '已上报';
                            } else {
                                return '未上报';
                            }
                        }
                    },
                    {
                        field: 'createUser',
                        title: '上传人',
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'createTime',
                        title: '上传日期', sortable: true,
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'qualityStatus',
                        title: '质检状态',sortable: true,
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 0 || value == null || value == 'null') {
                                return '未系统质检';
                            } else if (value == 1) {
                                return '系统质检通过';
                            } else if (value == 2) {
                                return '系统质检未通过';
                            }
                        }
                    },
                    {
                        field: 'qualityComment',
                        title: '质检意见',
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 'null') {
                                return null;
                            } else {
                                return value;
                            }
                        }
                    },
                ]
            ],
            toolbar: [{
                iconCls: 'fa fa-download',
                text: "导出",
                handler: function () {
                    window.location.href = getServer() + "/pc/fxqhHddc200/export";
                }
            }, {
                iconCls: 'fa fa-share-square-o',
                text: "系统自动质检",
                handler: function () {
                    submit6();
                }
            }],
            queryParams: {
                province: $("#provinceSelect").val(),
                city: $("#citySelect").val(),
                area: $("#areaSelect").val(),
                startTime: $("#complex1").val(),
                endTime: $("#complex2").val(),
            },
            pagination: true,
            pageSize: 10
        });
    };
    // 系统自动质检
    var submit6 = function () {
        var queryVo= {
                province: $("#provinceSelect").val(),
                city: $("#citySelect").val(),
                area: $("#areaSelect").val(),
                startTime: $("#complex1").val(),
                endTime: $("#complex2").val(),
            };
        loading.show();
        $.ajax({
            url: getServer() + "/pc/fxqhHddc200/dataQualityCheck",
            contentType: "application/json",
            data: JSON.stringify(queryVo),
            type: "post",
            success: function (data) {
                loading.close();
                Util.alert(data.message)
                createAuditGrid6();
            }
        });
    };
    // hddcquery 活动断层线查询
    var createAuditGrid7 = function () {
        $("#auditGrid").datagrid({
            url: getServer() + "/pc/hddcActivefault/findHddcActivefault",
            method: "GET",
            fitColumns: true,
            autoRowHeight: false,
            columns: [
                [
                    {
                        field: 'province',
                        title: '省', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'city',
                        title: '市', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'area',
                        title: '区（县）', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'id',
                        title: '断层编号', sortable: true,
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'name',
                        title: '断层名称',
                        width: '27%',
                        align: 'center',

                    },
                    {
                        field: 'feature',
                        title: '活动断层类型',
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'latestactiveperiod',
                        title: '活动时代',
                        width: '15%',
                        align: 'center',

                    },
                    {
                        field: 'isReportPg',
                        title: '是否上报pg库',
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 1) {
                                return '已上报';
                            } else {
                                return '未上报';
                            }
                        }
                    },
                    {
                        field: 'createUser',
                        title: '上传人',
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'createTime',
                        title: '上传日期', sortable: true,
                        width: '18%',
                        align: 'center',
                    },
                    {
                        field: 'qualityStatus',
                        title: '质检状态',sortable: true,
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 0 || value == null || value == 'null') {
                                return '未系统质检';
                            } else if (value == 1) {
                                return '系统质检通过';
                            } else if (value == 2) {
                                return '系统质检未通过';
                            }
                        }
                    },
                    {
                        field: 'qualityComment',
                        title: '质检意见',
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 'null') {
                                return null;
                            } else {
                                return value;
                            }
                        }
                    },
                ]
            ],
            toolbar: [{
                iconCls: 'fa fa-download',
                text: "导出",
                handler: function () {
                    window.location.href = getServer() + "/pc/hddcActivefault/export";
                }
            }, {
                iconCls: 'fa fa-share-square-o',
                text: "系统自动质检",
                handler: function () {
                    submit7();
                }
            }],
            queryParams: {
                province: $("#provinceSelect").val(),
                city: $("#citySelect").val(),
                area: $("#areaSelect").val(),
                startTime: $("#complex1").val(),
                endTime: $("#complex2").val(),
            },
            pagination: true,
            pageSize: 10
        });
    };
    // 系统自动质检
    var submit7 = function () {
        loading.show();
        var queryVo= {
                province: $("#provinceSelect").val(),
                city: $("#citySelect").val(),
                area: $("#areaSelect").val(),
                startTime: $("#complex1").val(),
                endTime: $("#complex2").val(),
            };
        $.ajax({
            url: getServer() + "/pc/hddcActivefault/dataQualityCheck",
            contentType: "application/json",
            data: JSON.stringify(queryVo),
            type: "post",
            success: function (data) {
                loading.close();
                Util.alert(data.message)
                createAuditGrid7();
            }
        });
    };
    // hddcPositionError 活动断层误差查询
    var createAuditGrid8 = function () {
        $("#auditGrid").datagrid({
            url: getServer() + "/pc/hddcActivefaultPositionerror/findData",
            method: "GET",
            fitColumns: true,
            autoRowHeight: false,
            columns: [
                [
                    {
                        field: 'province',
                        title: '省', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'city',
                        title: '市', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'area',
                        title: '区（县）', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'id',
                        title: '断层编号', sortable: true,
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'name',
                        title: '断层名称',
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'isReportPg',
                        title: '是否上报pg库',
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 1) {
                                return '已上报';
                            } else {
                                return '未上报';
                            }
                        }
                    },
                    {
                        field: 'createUser',
                        title: '上传人',
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'createTime',
                        title: '上传日期', sortable: true,
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'qualityStatus',
                        title: '质检状态',sortable: true,
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 0 || value == null || value == 'null') {
                                return '未系统质检';
                            } else if (value == 1) {
                                return '系统质检通过';
                            } else if (value == 2) {
                                return '系统质检未通过';
                            }
                        }
                    },
                    {
                        field: 'qualityComment',
                        title: '质检意见',
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 'null') {
                                return null;
                            } else {
                                return value;
                            }
                        }
                    },
                ]
            ],
            toolbar: [{
                iconCls: 'fa fa-download',
                text: "导出",
                handler: function () {
                    window.location.href = getServer() + "/pc/hddcActivefaultPositionerror/export";
                }
            }, {
                iconCls: 'fa fa-share-square-o',
                text: "系统自动质检",
                handler: function () {
                    submit8();
                }
            }],
            queryParams: {
                province: $("#provinceSelect").val(),
                city: $("#citySelect").val(),
                area: $("#areaSelect").val(),
                startTime: $("#complex1").val(),
                endTime: $("#complex2").val(),
            },
            pagination: true,
            pageSize: 10
        });

    };
    // 系统自动质检
    var submit8 = function () {
        var queryVo= {
                province: $("#provinceSelect").val(),
                city: $("#citySelect").val(),
                area: $("#areaSelect").val(),
                startTime: $("#complex1").val(),
                endTime: $("#complex2").val(),
            };
        loading.show();
        $.ajax({
            url: getServer() + "/pc/hddcActivefaultPositionerror/dataQualityCheck",
            contentType: "application/json",
            data: JSON.stringify(queryVo),
            type: "post",
            success: function (data) {
                loading.close();
                Util.alert(data.message)
                createAuditGrid8();
            }
        });
    };
    // hddc50Year63 50年超越概率63％地震作用下房屋直接经济损失等级图查询
    var createAuditGrid9 = function () {
        $("#auditGrid").datagrid({
            url: getServer() + "/pc/fxEconomicLossLevelMap/findData/1",
            method: "GET",
            fitColumns: true,
            autoRowHeight: false,
            columns: [
                [
                    {
                        field: 'province',
                        title: '省', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'city',
                        title: '市', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'area',
                        title: '区（县）', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'level',
                        title: '地震灾害房屋直接经济损失等级', sortable: true,
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'isReportPg',
                        title: '是否上报pg库',
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 1) {
                                return '已上报';
                            } else {
                                return '未上报';
                            }
                        }
                    },
                    {
                        field: 'createUser',
                        title: '上传人',
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'createTime',
                        title: '上传日期', sortable: true,
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'qualityStatus',
                        title: '质检状态',sortable: true,
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 0 || value == null || value == 'null') {
                                return '未系统质检';
                            } else if (value == 1) {
                                return '系统质检通过';
                            } else if (value == 2) {
                                return '系统质检未通过';
                            }
                        }
                    },
                    {
                        field: 'qualityComment',
                        title: '质检意见',
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 'null') {
                                return null;
                            } else {
                                return value;
                            }
                        }
                    },
                ]
            ],

            toolbar: [
                {
                    iconCls: 'fa fa-download',
                    text: "导出",
                    handler: function () {
                        window.location.href = getServer() + "/pc/fxEconomicLossLevelMap/export/1";
                    }
                }, {
                    iconCls: 'fa fa-share-square-o',
                    text: "系统自动质检",
                    handler: function () {
                        submit9();
                    }
                }],
            queryParams: {
                province: $("#provinceSelect").val(),
                city: $("#citySelect").val(),
                area: $("#areaSelect").val(),
                startTime: $("#complex1").val(),
                endTime: $("#complex2").val(),
            },
            pagination: true,
            pageSize: 10
        });
    };
    // 系统自动质检
    var submit9 = function () {
        var queryVo= {
                province: $("#provinceSelect").val(),
                city: $("#citySelect").val(),
                area: $("#areaSelect").val(),
                startTime: $("#complex1").val(),
                endTime: $("#complex2").val(),
            };
        loading.show();
        $.ajax({
            url: getServer() + "/pc/fxEconomicLossLevelMap/dataQualityCheck/1",
            contentType: "application/json",
            data: JSON.stringify(queryVo),
            type: "post",
            success: function (data) {
                loading.close();
                Util.alert(data.message)
                createAuditGrid9();
            }
        });
    };
    // hddc50Year10 50年超越概率10％地震作用下房屋直接经济损失失等级图查询
    var createAuditGrid10 = function () {
        $("#auditGrid").datagrid({
            url: getServer() + "/pc/fxEconomicLossLevelMap/findData/2",
            method: "GET",
            fitColumns: true,
            autoRowHeight: false,
            columns: [
                [
                    {
                        field: 'province',
                        title: '省', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'city',
                        title: '市', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'area',
                        title: '区（县）', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'level',
                        title: '地震灾害房屋直接经济损失等级', sortable: true,
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'isReportPg',
                        title: '是否上报pg库',
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 1) {
                                return '已上报';
                            } else {
                                return '未上报';
                            }
                        }
                    },
                    {
                        field: 'createUser',
                        title: '上传人',
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'createTime',
                        title: '上传日期', sortable: true,
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'qualityStatus',
                        title: '质检状态',sortable: true,
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 0 || value == null || value == 'null') {
                                return '未系统质检';
                            } else if (value == 1) {
                                return '系统质检通过';
                            } else if (value == 2) {
                                return '系统质检未通过';
                            }
                        }
                    },
                    {
                        field: 'qualityComment',
                        title: '质检意见',
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 'null') {
                                return null;
                            } else {
                                return value;
                            }
                        }
                    },
                ]
            ],
            toolbar: [{
                iconCls: 'fa fa-download',
                text: "导出",
                handler: function () {
                    window.location.href = getServer() + "/pc/fxEconomicLossLevelMap/export/2";
                }
            }, {
                iconCls: 'fa fa-share-square-o',
                text: "系统自动质检",
                handler: function () {
                    submit10();
                }
            }],
            queryParams: {
                province: $("#provinceSelect").val(),
                city: $("#citySelect").val(),
                area: $("#areaSelect").val(),
                startTime: $("#complex1").val(),
                endTime: $("#complex2").val(),
            },
            pagination: true,
            pageSize: 10
        });
    };
    // 系统自动质检
    var submit10 = function () {
        var queryVo= {
                province: $("#provinceSelect").val(),
                city: $("#citySelect").val(),
                area: $("#areaSelect").val(),
                startTime: $("#complex1").val(),
                endTime: $("#complex2").val(),
            };
        loading.show();
        $.ajax({
            url: getServer() + "/pc/fxEconomicLossLevelMap/dataQualityCheck/2",
            contentType: "application/json",
            data: JSON.stringify(queryVo),
            type: "post",
            success: function (data) {
                loading.close();
                Util.alert(data.message)
                createAuditGrid10();
            }
        });
    };
    // hddc50Year2 50年超越概率2％地震作用下房屋直接经济损失等级图查询
    var createAuditGrid11 = function () {
        $("#auditGrid").datagrid({
            url: getServer() + "/pc/fxEconomicLossLevelMap/findData/3",
            method: "GET",
            fitColumns: true,
            autoRowHeight: false,
            columns: [
                [
                    {
                        field: 'province',
                        title: '省', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'city',
                        title: '市', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'area',
                        title: '区（县）', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'level',
                        title: '地震灾害房屋直接经济损失等级', sortable: true,
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'isReportPg',
                        title: '是否上报pg库',
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 1) {
                                return '已上报';
                            } else {
                                return '未上报';
                            }
                        }
                    },
                    {
                        field: 'createUser',
                        title: '上传人',
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'createTime',
                        title: '上传日期', sortable: true,
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'qualityStatus',
                        title: '质检状态',sortable: true,
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 0 || value == null || value == 'null') {
                                return '未系统质检';
                            } else if (value == 1) {
                                return '系统质检通过';
                            } else if (value == 2) {
                                return '系统质检未通过';
                            }
                        }
                    },
                    {
                        field: 'qualityComment',
                        title: '质检意见',
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 'null') {
                                return null;
                            } else {
                                return value;
                            }
                        }
                    },
                ]
            ],
            toolbar: [{
                iconCls: 'fa fa-download',
                text: "导出",
                handler: function () {
                    window.location.href = getServer() + "/pc/fxEconomicLossLevelMap/export/3";
                }
            }, {
                iconCls: 'fa fa-share-square-o',
                text: "系统自动质检",
                handler: function () {
                    submit11();
                }
            }],
            queryParams: {
                province: $("#provinceSelect").val(),
                city: $("#citySelect").val(),
                area: $("#areaSelect").val(),
                startTime: $("#complex1").val(),
                endTime: $("#complex2").val(),
            },
            pagination: true,
            pageSize: 10
        });
    };
    // 系统自动质检
    var submit11 = function () {
        var queryVo= {
                province: $("#provinceSelect").val(),
                city: $("#citySelect").val(),
                area: $("#areaSelect").val(),
                startTime: $("#complex1").val(),
                endTime: $("#complex2").val(),
            };
        loading.show();
        $.ajax({
            url: getServer() + "/pc/fxEconomicLossLevelMap/dataQualityCheck/3",
            contentType: "application/json",
            data: JSON.stringify(queryVo),
            type: "post",
            success: function (data) {
                loading.close();
                Util.alert(data.message)
                createAuditGrid11();
            }
        });
    };
    // hddc50Year1 100年超越概率1％地震作用下房屋直接经济损失等级图查询
    var createAuditGrid12 = function () {
        $("#auditGrid").datagrid({
            url: getServer() + "/pc/fxEconomicLossLevelMap/findData/4",
            method: "GET",
            fitColumns: true,
            autoRowHeight: false,
            columns: [
                [
                    {
                        field: 'province',
                        title: '省', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'city',
                        title: '市', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'area',
                        title: '区（县）', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'level',
                        title: '地震灾害房屋直接经济损失等级', sortable: true,
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'isReportPg',
                        title: '是否上报pg库',
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 1) {
                                return '已上报';
                            } else {
                                return '未上报';
                            }
                        }
                    },
                    {
                        field: 'createUser',
                        title: '上传人',
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'createTime',
                        title: '上传日期', sortable: true,
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'qualityStatus',
                        title: '质检状态',sortable: true,
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 0 || value == null || value == 'null') {
                                return '未系统质检';
                            } else if (value == 1) {
                                return '系统质检通过';
                            } else if (value == 2) {
                                return '系统质检未通过';
                            }
                        }
                    },
                    {
                        field: 'qualityComment',
                        title: '质检意见',
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 'null') {
                                return null;
                            } else {
                                return value;
                            }
                        }
                    },
                ]
            ],
            toolbar: [{
                iconCls: 'fa fa-download',
                text: "导出",
                handler: function () {
                    window.location.href = getServer() + "/pc/fxEconomicLossLevelMap/export/4";
                }
            }, {
                iconCls: 'fa fa-share-square-o',
                text: "系统自动质检",
                handler: function () {
                    submit12();
                }
            }],
            queryParams: {
                province: $("#provinceSelect").val(),
                city: $("#citySelect").val(),
                area: $("#areaSelect").val(),
                startTime: $("#complex1").val(),
                endTime: $("#complex2").val(),
            },
            pagination: true,
            pageSize: 10
        });
    };
    // 系统自动质检
    var submit12 = function () {
        var queryVo= {
                province: $("#provinceSelect").val(),
                city: $("#citySelect").val(),
                area: $("#areaSelect").val(),
                startTime: $("#complex1").val(),
                endTime: $("#complex2").val(),
            };
        loading.show();
        $.ajax({
            url: getServer() + "/pc/fxEconomicLossLevelMap/dataQualityCheck/4",
            contentType: "application/json",
            data: JSON.stringify(queryVo),
            type: "post",
            success: function (data) {
                loading.close();
                Util.alert(data.message)
                createAuditGrid12();
            }
        });
    };
    // hddc50YearDie63 50年超越概率63％地震作用下房屋破坏致死人口数量等级图查询
    var createAuditGrid13 = function () {
        $("#auditGrid").datagrid({
            url: getServer() + "/pc/fxCasualtyLevelMap/findData/1",
            method: "GET",
            fitColumns: true,
            autoRowHeight: false,
            columns: [
                [
                    {
                        field: 'province',
                        title: '省', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'city',
                        title: '市', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'area',
                        title: '区（县）', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'level',
                        title: '地震灾害房屋死亡人口数量等级', sortable: true,
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'isReportPg',
                        title: '是否上报pg库',
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 1) {
                                return '已上报';
                            } else {
                                return '未上报';
                            }
                        }
                    },
                    {
                        field: 'createUser',
                        title: '上传人',
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'createTime',
                        title: '上传日期', sortable: true,
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'qualityStatus',
                        title: '质检状态',sortable: true,
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 0 || value == null || value == 'null') {
                                return '未系统质检';
                            } else if (value == 1) {
                                return '系统质检通过';
                            } else if (value == 2) {
                                return '系统质检未通过';
                            }
                        }
                    },
                    {
                        field: 'qualityComment',
                        title: '质检意见',
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 'null') {
                                return null;
                            } else {
                                return value;
                            }
                        }
                    },
                ]
            ],
            toolbar: [{
                iconCls: 'fa fa-download',
                text: "导出",
                handler: function () {
                    window.location.href = getServer() + "/pc/fxCasualtyLevelMap/export/1";
                }
            }, {
                iconCls: 'fa fa-share-square-o',
                text: "系统自动质检",
                handler: function () {
                    submit13();
                }
            }],
            queryParams: {
                province: $("#provinceSelect").val(),
                city: $("#citySelect").val(),
                area: $("#areaSelect").val(),
                startTime: $("#complex1").val(),
                endTime: $("#complex2").val(),
            },
            pagination: true,
            pageSize: 10
        });
    };
    // 系统自动质检
    var submit13 = function () {
        var queryVo= {
                province: $("#provinceSelect").val(),
                city: $("#citySelect").val(),
                area: $("#areaSelect").val(),
                startTime: $("#complex1").val(),
                endTime: $("#complex2").val(),
            };
        loading.show();
        $.ajax({
            url: getServer() + "/pc/fxCasualtyLevelMap/dataQualityCheck/1",
            contentType: "application/json",
            data: JSON.stringify(queryVo),
            type: "post",
            success: function (data) {
                loading.close();
                Util.alert(data.message)
                createAuditGrid13();
            }
        });
    };
    // hddc50YearDie10 50年超越概率10％地震作用下房屋破坏致死人口数量等级图查询
    var createAuditGrid14 = function () {
        $("#auditGrid").datagrid({
            url: getServer() + "/pc/fxCasualtyLevelMap/findData/2",
            method: "GET",
            fitColumns: true,
            autoRowHeight: false,
            columns: [
                [
                    {
                        field: 'province',
                        title: '省', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'city',
                        title: '市', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'area',
                        title: '区（县）', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'level',
                        title: '地震灾害房屋死亡人口数量等级', sortable: true,
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'isReportPg',
                        title: '是否上报pg库',
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 1) {
                                return '已上报';
                            } else {
                                return '未上报';
                            }
                        }
                    },
                    {
                        field: 'createUser',
                        title: '上传人',
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'createTime',
                        title: '上传日期', sortable: true,
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'qualityStatus',
                        title: '质检状态',sortable: true,
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 0 || value == null || value == 'null') {
                                return '未系统质检';
                            } else if (value == 1) {
                                return '系统质检通过';
                            } else if (value == 2) {
                                return '系统质检未通过';
                            }
                        }
                    },
                    {
                        field: 'qualityComment',
                        title: '质检意见',
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 'null') {
                                return null;
                            } else {
                                return value;
                            }
                        }
                    },
                ]
            ],
            toolbar: [{
                iconCls: 'fa fa-download',
                text: "导出",
                handler: function () {
                    window.location.href = getServer() + "/pc/fxCasualtyLevelMap/export/2";
                }
            }, {
                iconCls: 'fa fa-share-square-o',
                text: "系统自动质检",
                handler: function () {
                    submit14();
                }
            }],
            queryParams: {
                province: $("#provinceSelect").val(),
                city: $("#citySelect").val(),
                area: $("#areaSelect").val(),
                startTime: $("#complex1").val(),
                endTime: $("#complex2").val(),
            },
            pagination: true,
            pageSize: 10
        });
    };
    // 系统自动质检
    var submit14 = function () {
        var queryVo= {
                province: $("#provinceSelect").val(),
                city: $("#citySelect").val(),
                area: $("#areaSelect").val(),
                startTime: $("#complex1").val(),
                endTime: $("#complex2").val(),
            };
        loading.show();
        $.ajax({
            url: getServer() + "/pc/fxCasualtyLevelMap/dataQualityCheck/2",
            contentType: "application/json",
            data: JSON.stringify(queryVo),
            type: "post",
            success: function (data) {
                loading.close();
                Util.alert(data.message)
                createAuditGrid14();
            }
        });
    };
    // hddchddc50YearDie2 50年超越概率2％地震作用下房屋破坏致死人口数量等级图查询
    var createAuditGrid15 = function () {
        $("#auditGrid").datagrid({
            url: getServer() + "/pc/fxCasualtyLevelMap/findData/3",
            method: "GET",
            fitColumns: true,
            autoRowHeight: false,
            columns: [
                [
                    {
                        field: 'province',
                        title: '省', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'city',
                        title: '市', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'area',
                        title: '区（县）', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'level',
                        title: '地震灾害房屋死亡人口数量等级', sortable: true,
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'isReportPg',
                        title: '是否上报pg库',
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 1) {
                                return '已上报';
                            } else {
                                return '未上报';
                            }
                        }
                    },
                    {
                        field: 'createUser',
                        title: '上传人',
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'createTime',
                        title: '上传日期', sortable: true,
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'qualityStatus',
                        title: '质检状态',sortable: true,
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 0 || value == null || value == 'null') {
                                return '未系统质检';
                            } else if (value == 1) {
                                return '系统质检通过';
                            } else if (value == 2) {
                                return '系统质检未通过';
                            }
                        }
                    },
                    {
                        field: 'qualityComment',
                        title: '质检意见',
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 'null') {
                                return null;
                            } else {
                                return value;
                            }
                        }
                    },
                ]
            ],
            toolbar: [{
                iconCls: 'fa fa-download',
                text: "导出",
                handler: function () {
                    window.location.href = getServer() + "/pc/fxCasualtyLevelMap/export/3";
                }
            }, {
                iconCls: 'fa fa-share-square-o',
                text: "系统自动质检",
                handler: function () {
                    submit15();
                }
            }],
            queryParams: {
                province: $("#provinceSelect").val(),
                city: $("#citySelect").val(),
                area: $("#areaSelect").val(),
                startTime: $("#complex1").val(),
                endTime: $("#complex2").val(),
            },
            pagination: true,
            pageSize: 10
        });
    };
    // 系统自动质检
    var submit15 = function () {
        var queryVo= {
                province: $("#provinceSelect").val(),
                city: $("#citySelect").val(),
                area: $("#areaSelect").val(),
                startTime: $("#complex1").val(),
                endTime: $("#complex2").val(),
            };
        loading.show();
        $.ajax({
            url: getServer() + "/pc/fxCasualtyLevelMap/dataQualityCheck/3",
            contentType: "application/json",
            data: JSON.stringify(queryVo),
            type: "post",
            success: function (data) {
                loading.close();
                Util.alert(data.message)
                createAuditGrid15();
            }
        });
    };
    // hddchddc50YearDie1 100年超越概率1％地震作用下房屋破坏致死人口数量等级图查询
    var createAuditGrid16 = function () {
        $("#auditGrid").datagrid({
            url: getServer() + "/pc/fxCasualtyLevelMap/findData/4",
            method: "GET",
            fitColumns: true,
            autoRowHeight: false,
            columns: [
                [
                    {
                        field: 'province',
                        title: '省', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'city',
                        title: '市', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'area',
                        title: '区（县）', sortable: true,
                        width: '12%',
                        align: 'center',
                    },
                    {
                        field: 'level',
                        title: '地震灾害房屋死亡人口数量等级', sortable: true,
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'isReportPg',
                        title: '是否上报pg库',
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 1) {
                                return '已上报';
                            } else {
                                return '未上报';
                            }
                        }
                    },
                    {
                        field: 'createUser',
                        title: '上传人',
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'createTime',
                        title: '上传日期', sortable: true,
                        width: '10%',
                        align: 'center',

                    },
                    {
                        field: 'qualityStatus',
                        title: '质检状态',sortable: true,
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 0 || value == null || value == 'null') {
                                return '未系统质检';
                            } else if (value == 1) {
                                return '系统质检通过';
                            } else if (value == 2) {
                                return '系统质检未通过';
                            }
                        }
                    },
                    {
                        field: 'qualityComment',
                        title: '质检意见',
                        width: '10%',
                        align: 'center',
                        formatter: function (value) {
                            if (value == 'null') {
                                return null;
                            } else {
                                return value;
                            }
                        }
                    },
                ]
            ],
            toolbar: [{
                iconCls: 'fa fa-download',
                text: "导出",
                handler: function () {
                    window.location.href = getServer() + "/pc/fxCasualtyLevelMap/export/4";
                }
            }, {
                iconCls: 'fa fa-share-square-o',
                text: "系统自动质检",
                handler: function () {
                    submit16();
                }
            }],
            queryParams: {
                province: $("#provinceSelect").val(),
                city: $("#citySelect").val(),
                area: $("#areaSelect").val(),
                startTime: $("#complex1").val(),
                endTime: $("#complex2").val(),
            },
            pagination: true,
            pageSize: 10
        });
    };
    // 系统自动质检
    var submit16 = function () {
        var queryVo= {
                province: $("#provinceSelect").val(),
                city: $("#citySelect").val(),
                area: $("#areaSelect").val(),
                startTime: $("#complex1").val(),
                endTime: $("#complex2").val(),
            };
        loading.show();
        $.ajax({
            url: getServer() + "/pc/fxCasualtyLevelMap/dataQualityCheck/4",
            contentType: "application/json",
            data: JSON.stringify(queryVo),
            type: "post",
            success: function (data) {
                loading.close();
                Util.alert(data.message)
                createAuditGrid16();
            }
        });
    };
    return {
        init: init
    }
})